import request from '@/utils/request'

export function getList(page, limit, employeeQuery) {
  return request({
    url: `/dormitory/employee/list/${page}/${limit}`,
    method: 'post',
    data: employeeQuery
  })
}

export function getEmployee(id) {
  return request({
    url: `/dormitory/employee/getEmployee/${id}`,
    method: 'get'
  })
}

export function buildingList() {
  return request({
    url: `/dormitory/building/buildingList`,
    method: 'get'
  })
}

export function remove(index) {
  return request({
    url: `/dormitory/employee/remove/${index}`,
    method: 'delete'
  })
}

export function save(employee) {
  return request({
    url: `/dormitory/employee/save`,
    method: 'post',
    data: employee
  })
}
